using System.Collections;
using System.Collections.Generic;

namespace Magiq.Support
{
    public class ListInsertDestination<T> : IInsertDestination<T>
    {
        private readonly IList list;

        public ListInsertDestination(IList list)
        {
            this.list = list;
        }

        #region IInsertDestination<T> Members

        public void Insert(IEnumerable<T> items)
        {
            foreach (var item in items)
                list.Add(item);
        }

        #endregion
    }
}